package com.borrowing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.borrowing.entity.pojo.User;
import com.borrowing.entity.pojo.dto.QueryDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("select COUNT(*) from user where user_name = #{userName}")
    int selectByName(@Param("userName") String userName);

    User selectAllByName(String userName);

    List<User> selectAll(@Param("queryDto") QueryDto queryDto);
}
